import Vuex from 'vuex'
import Vue from 'vue'
 
Vue.use(Vuex)
const store= new Vuex.Store({
  state: {
    isLogin: !!uni.getStorageSync('deng'),
	user: uni.getStorageSync('user')
  },
  mutations: {
    login(state) {
        state.isLogin = true
    },
	logout(state){
		state.isLogin=false
		state.user=''
	},
	refresh(state){
		state.user=uni.getStorageSync('user')
	}
  },
  actions: {
  },
  modules: {
  }
})
export default store
